package com.lzw.breezeNovel.webApp.mapper.comic;

import com.lzw.breezeNovel.model.entity.pojo.comic.ComicChapter;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp.mapper.comic
 * @date 2025/3/16
 * @description
 */
@Mapper
@SuppressWarnings("all")
public interface ComicChapterMapper {

    /**
     * 根据小说id查询章节数量
     */
    @Select("select count(*) from comic_chapter where comic_id = #{comicId}")
    public Long selectCountByComicId(Long comicId);

    /**
     * 根据小说id分页查询章节
     */
    List<ComicChapter> selectByComicId(Long comicId, Integer start, Integer pageSize);
}
